<template>
    <div>
        <h1>{{msg}}</h1>
        <button @click="sendData">sendData</button>
    </div>
</template>

<script>
export default {
    props:["msg"],
    data(){
        return{
            child_message:"hello vue"
        }
    },
    methods : {
        sendData(){
            this.$emit("sendData",this.child_message)
        }
    }
}
</script>